import React, { useContext } from 'react'
import { TabContext } from "../../components/TabHeader"
import "./Card.scss"

export default function ContactUsCard({ icon, title, i }) {
    const data = useContext(TabContext)
    return <div className="contact-us-card">
        <div className="content">
            <div className="title">{title}</div>
            {data.emailCn[i] && <div className="email">中文邮箱：{data.emailCn[i]}</div>}
            {data.emailEn[i] && <div className="email">英文邮箱：{data.emailEn[i]}</div>}
        </div>
        <img src={icon} alt="" />
    </div>
}
